package com.singlemusic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.singlemusic.dao.BaseDao;
import com.singlemusic.pojo.Users;

@Service(value="userService")
public class UserService extends BaseServiceImpl{
	
	@SuppressWarnings("unchecked")
	public List<Users> findByPage(String hql, String[] param, int page, int row){
		return (List<Users>)super.findByPage(hql, param, page, row);
	}
	@SuppressWarnings("unchecked")
	public boolean userReg(Users users){
		return super.add(users);
	}
	@SuppressWarnings("unchecked")
	public Users login(String userid){
		
		return (Users)super.findById(Users.class, userid);
	}
	public int count(String hql,String[] param){
		return super.getResultCount(hql, param);
	}
	@SuppressWarnings("unchecked")
	public List<Users> findBySql(String sql,String[] param){
		return (List<Users>)super.findBySql(Users.class,sql,param);
	}
	
}
